<?php
class coop{
    private $coopID;
    
    public function __construct() {
        $args = func_get_args();
    }
    
    function setCoopID($coopID){
        $this->coopID=$coopID;
    }
    private function getCoopID($coopID){
        return $this->coopID;
    }
    function getCoop(){
        $mysqli=connect();
        $query="
            select  *
            from    ".COOP_TABLE."
            where   coopID='".$coopID."'
            ";
        $result=$mysqli->query($query);
        return $result->fetch_array(MYSQLI_ASSOC);
    }
    function getCoopArr(){
        $mysqli=connect();
        $query="
            select  *
            from    ".COOP_TABLE."
            ";
        $result=$mysqli->query($query);
        while($row=$result->fetch_array(MYSQLI_ASSOC)){
            $temp[$row["coopID"]]=$row["coopName"];
        }
        return $temp;
    }
}